{template 'phpcms','header'}

<!--热门作品效果-->
<script type="text/javascript">
	$(function() {
		$(".hotWorksbg").hover(function() {
			$(this).children(".next").stop().css("right", "-40px").animate({
				"right" : "10px"
				},200);
			$(this).children(".prev").stop().css("left", "-40px").animate({
				"left" : "10px"
				},200);
		},
		function() {
			$(this).children(".next").stop().css("right", "10px").animate({
				"right" : "-40px"
				},200);
			$(this).children(".prev").stop().css("left", "10px").animate({
				"left" : "-40px"
				},200);
		});
		$(".hotScroll span").hover(function() {
			$(this).addClass("hover")
		},
		function() {
			$(this).removeClass("hover")
		});
	});

	$(window).bind("load",function(){
		(function(){
			var halfWidth = 0,
				totalWidth = 0;
			for(var i = 0, l = $(".hotWorksH > .hotWorksPic").length; i < l; i++){
				totalWidth += $(".hotWorksH > .hotWorksPic:eq("+i+")").outerWidth(true);
			}

			for(var i = 0; i < l; i++){
				if(halfWidth >= totalWidth/2){
					break;
				}

				halfWidth += $(".hotWorksH > .hotWorksPic:eq("+i+")").outerWidth(true);
			}

			$(".hotWorksH").css("width", halfWidth + "px");


			var initX,
				initLeft,
				workOuterWidth = parseFloat($(".hotWorksList").css("width")) || 0,
				scrollerWidth = $(".hotScroll > span").outerWidth(),
				scrollOuterWidth = $(".hotScroll").outerWidth();
			$(".hotScroll > span").bind("mousedown",function(event){
				initX = event.pageX || event.clientX;
				initLeft = parseFloat($(this).css("marginLeft")) || 0;
			});

			$(document).bind("mousemove",function(event){
				if(typeof initX == "number"){
					var x = event.pageX || event.clientX,
						change = x - initX;

					if(initLeft + change >= 0 && initLeft + change <= scrollOuterWidth - scrollerWidth){
						$(".hotScroll > span").css("marginLeft", initLeft + change + "px");
						$(".hotWorksH").css("marginLeft",(-1)*(initLeft + change)*(halfWidth - workOuterWidth)/(scrollOuterWidth - scrollerWidth) + "px");
					}
				}
			}).bind("mouseup",function(){
				if(typeof initX == "number"){
					initX = null;
					initLeft = null;
				}
			});

			$(".prev,.next").bind("click",function(event){
				event.preventDefault();
				var workInitLeft = parseFloat($(".hotWorksH").css("marginLeft")) || 0;

				if($(this).hasClass("prev")){
					workInitLeft += 960;
				} else {
					workInitLeft -= 960;
				}

				if(workInitLeft >= 0){
					workInitLeft = 0;
				} else if(workInitLeft <= workOuterWidth - halfWidth){
					workInitLeft = workOuterWidth - halfWidth;
				}

				$(".hotWorksH").stop().animate({
					"marginLeft" : workInitLeft + "px"
				},399);

				$(".hotScroll > span").stop().animate({
					"marginLeft" : (-1)*workInitLeft*(scrollOuterWidth - scrollerWidth)/(halfWidth - workOuterWidth) + "px"
				},399);

			});

		})()
	});
</script>
<script>
$(document).ready(function(){
	//alert("ddddddd");
	$("ul.listSub li:first").addClass("current");
});</script>

<div class="pw fix z mt30">
	<div class="fl lay710 mr20">
    <!--幻灯片-->
      {tag_首页幻灯片}
    </div>
    <div class="fl lay250">
    	<div class="adv advR">
        <!--右侧海报 250*250-->
        <!--AdForward Begin:-->
		<script language="javascript" src="data/js.php?id=8"></script>
		<!--AdForward End-->
        </div>
    </div>
</div>
<div class="pw fix z mt30">
	<div class="fl lay250 mr10">
    	<h2 class="bdtit z nodot"><span class="titName"><a href="" class="bl" target="_blank">聚焦</a></span></h2>
    <ul class="f12 lh40 oh bg listSub artNews">
	{tag_网站首页推荐}
    </ul>
    </div>
    <div class="lay450 fl mr20">
    	<h2 class="bdtit z nodot"><span class="titName"><a href="" class="bl" target="_blank">推荐作品</a></span></h2>
        <div class="remList">
        	<ul>
           {tag_首页推荐图片}
            </ul>
        </div>
    </div>
    <div class="lay250 fr">
    	<h2 class="bdtit z"><span class="titName"><a href="tags.php" class="bl" target="_blank">热门标签</a></span></h2>
        <ul class="comp_list24 bg galNews">
		<!--{get sql="select tag,hits from phpcms_keyword order by listorder desc,hits desc" rows="8"}-->        
		<li><p class="fr">({$r[hits]})</p><a target="_blank"  href="tag.php?tag={urlencode($r[tag])}" class="fblod">{$r[tag]}</a></li>
	  <!--{/get}-->          
     </ul>
     <div class="adv">
     <!--右侧按钮一 250*70-->
<!--AdForward Begin:-->
<script language="javascript" src="data/js.php?id=9"></script>
<!--AdForward End-->
     </div>
    </div>
</div>
<div class="pw hotWorks">
	<h2 class="bdtit z nodot"><span class="titName"><a class="bl" href="" target="_blank">热门作品</a></span></h2>
    <div class="hotWorksbg">
    	<a href="javascript:void(0);" class="next"></a>
        <a href="javascript:void(0);" class="prev"></a>
    	<div class="hotWorksList">
        	<div class="hotWorksWidth">
                       <div class="hotWorksH">
					   {tag_首页最新图片}
</div>
            </div>
        </div>
        <div class="hotScroll"><span></span></div>
    </div>
</div>
<div class="adv pw mt30 fix z">
<div class="lay320 fl mr10">
<!--新版画廊-三分之一通栏一 320*70-->
<!--AdForward Begin:-->
<script language="javascript" src="data/js.php?id=10"></script>
<!--AdForward End-->
</div>
<div class="lay320 fl mr10">
<!--新版画廊-三分之一通栏二-->
<!--AdForward Begin:-->
<script language="javascript" src="data/js.php?id=11"></script>
<!--AdForward End-->
</div>
<div class="lay320 fr">
<!--新版画廊-三分之一通栏三-->
<!--AdForward Begin:-->
<script language="javascript" src="http://127.0.0.1/phpcms/data/js.php?id=12"></script>
<!--AdForward End-->
</div>
</div>
<div class="pw exList mt30">
	<h2 class="bdtit z nodot"><span class="titName"><a class="bl" href="" target="_blank">展览</a></span></h2>
	<ul class="fix z">
	<!--{get sql="select c.catid,c.catname, c.image,c.description,c.url from phpcms_category c where c.parentid=23 and c.image!=''" rows="5"}-->
    	           <li >

<a href="{$r[url]}" target="_blank" class="bgLink"></a>
        	<span class="exPic"><img src="{thumb($r[image],188,250)}" width="188" alt="{$r[catname]}"/></span>
            <div class="exInfo">
            	<h4>{$r[catname]}</h4>
                <p>地址：UNIONART</p>
                <p>时间：2013-07-06～08-06</p>
                <p>简介：{str_cut($r[description],6,'')}</p>
            </div>
         </li>
	<!--{/get}-->

    </ul>
</div>

<div class="pw fix z mt30">
	<h2 class="bdtit z nodot"><span class="titName"><a class="bl" href="" target="_blank">画廊</a></span></h2>
	<!--{get sql="select c.catid,c.catname, c.image,c.description,c.url from phpcms_category c where c.parentid=14 and c.image!='' order by c.items" rows="2"}-->
    <div class="lay340 fl mr20">
    	<h3 class="galName"><a href="{$r[url]}" target="_blank">{$r[catname]}</a><em></em></h3>
        <div class="galDetail">
        	<dl class="fix z">
            	<dt><a href="{$r[url]}" target="_blank"><img src="{thumb($r[image],160,120)}"  width="160" height="120" alt="{$r[catname]}"/></a></dt>
                <dd>
                	<h4><a href="{$r[url]}" target="_blank">{$r[catname]}</a></h4>
                    <p>{str_cut($r[description],70,'')}</p>
                </dd>
            </dl>
            <ul class="fix z">
			<!--{get sql="select c.title, c.thumb, c.url from phpcms_content c where c.status=99 and c.catid=$r[catid]" rows="3" return="v"}-->
            	<li class="fl mr5"><a href="{$v[url]}" target="_blank" ><img src="{thumb($v[thumb],100,75)}"  width="100" height="75" alt="{$v[title]}"/></a></li>
               
				<!--{/get}-->  
            </ul>
        </div>
    </div>
	<!--{/get}-->    
    <div class="lay260 fr">
    	<h2 class="bdtit z nodot hot"><span class="titName"><b>热度榜</b></span></h2>
        <div class="bg hotTop">
    	<ol class="ol30 lih ol2 oh">
		<!--{get sql="select d.contentid,d.supports,c.title,c.style,c.url from phpcms_digg d left join phpcms_content c on d.contentid=c.contentid where c.status=99 order by d.supports_week desc" rows="8"}-->	
	<li ><b class="up">{$r[supports]}</b><a target="_blank" href="{$r[url]}" class="fblod">{str_cut($r[title], 44)}</a></li>
	<!--{/get}-->
        </ol>
        
        </div>
    </div>
</div>
<div class="pw newJoin mt30">
	<h2 class="bdtit z nodot"><span class="titName"><a class="bl" href="#" target="_blank">最新加入</a></span></h2>
    <ul class="fix z">
	<!--{get sql="select c.catid,c.catname, c.image,c.description,c.url from phpcms_category c where c.parentid=23 and c.image!='' order by c.catid desc" rows="5"}-->
    	 <li class="mr5">
<a class="bgLink" target="_blank" href="{$r[url]}"></a>
         <img src="{thumb($r[image],188,188)}" width="188" height="188" alt="{$r[catname]}">
            <b style=""></b>
            <div class="joinInfo">
             <h4>{str_cut($r[catname],20)}</h4>
                <p>{str_cut($r[description],32)}</p>
            </div>
</li>
<!--{/get}-->

    </ul>
</div>
<div class="pw joinInfo">

  <p class="oh contact">责任编辑：王融孚<span class="tel"></span><a href="mailto:jaff521@gmail.com" class="mail">jaff521@gmail.com</a></p>
</div>

{template 'phpcms','footer'}